import React from 'react';
import { Card, Descriptions } from 'antd';
import MaskText from '@/components/MaskText';

export default class PositionTab extends React.Component<any, any> {
  render() {
    const { lat, lon, gpsStatus } = this.props;

    return (
      <>
        <Descriptions bordered size="small">
          <Descriptions.Item label="定位状态">{gpsStatus}</Descriptions.Item>
          <Descriptions.Item label="经度">
            <MaskText text={lon} type="longitude" />
          </Descriptions.Item>
          <Descriptions.Item label="纬度">
            <MaskText text={lat} type="latitude" />
          </Descriptions.Item>
        </Descriptions>
      </>
    );
  }
}
